import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { AllExceptionsFilter } from './exception.filter';
import { LoggerService } from './logger.service';

const logger = new LoggerService();

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.useGlobalFilters(new AllExceptionsFilter());
  await app.listen(3000);
  logger.log('Application is running on: http://localhost:3000');
}
bootstrap();
